package CopyJava;

import java.io.*;

public class CopyJavaDemo {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new FileReader("demo\\src\\fos.java"));
        BufferedWriter bw=new BufferedWriter(new FileWriter("demo\\src\\Copy.java"));
    //    int ch;
    //    while ((ch=br.read())!=-1){
      //      bw.write(ch);
   //     }
        char[] chs=new char[1024];
        int len;
        while((len=br.read(chs))!=-1){
            bw.write(chs,0,len);
        }
        bw.close();
        br.close();
    }
}
